package com.example;

import com.example.exam1.BwqFactory;
import com.example.exam1.Factory;
import com.example.exam1.ProxyFactory;
import com.example.exam2.DyProxyFactory;
import com.example.exam2.Girl;
import com.example.exam2.GirlBwq;

public class Main {
    public static void main(String[] args) {
        //t1();
        t2();

        
    }
    
    public static void t1() {
        Factory bwqFactory = new BwqFactory();
        Factory proxyFactory = new ProxyFactory(bwqFactory);
        proxyFactory.product();
    }
    
    public static void t2() {
        GirlBwq girl = new GirlBwq();
        Girl proxy = (Girl) DyProxyFactory.getProxyInstance(girl);
        proxy.say();
    }
}
